package com.quectel.sys.module.sys.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author rananxin
 */
@Data
public class SysRoleDto implements Serializable {

    private Long id;

    @Schema(description = "租户id")
    private Long tenantId;

    @Schema(description = "组id")
    private Long groupId;

    @Schema(description = "角色名")
    @NotBlank
    @Length(min = 1, max = 80)
    private String name;

    @Schema(description = "状态1正常0锁定")
    private Byte status;

    @Schema(description = "")
    private String creator;

    @Schema(description = "")
    private Date createTime;

    @Schema(description = "")
    private String editor;

    @Schema(description = "")
    private Date editTime;


    /************非数据库字段 start ************/

    @Schema(description = "根据角色构建树，包含所有菜单，如果角色拥有菜单checked字段为true 否则为false")
    private List<SysMenuDto> roleMenuList = new ArrayList<>();

    /************非数据库字段 end **************/

}
